package util;

import com.adgroup.doremon_ad.R;

import android.app.Dialog;
import android.content.Context;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;



public class CustomDialogClass extends Dialog {

	public CustomDialogClass(Context context) {

		super(context);

	}

	public Dialog createCustomDialog(int layout, Context context,
			CharSequence titleText, CharSequence bodyText, boolean isCancelable) {

		Dialog dialog = new Dialog(context);
		dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
		dialog.setContentView(layout);
		dialog.setCancelable(isCancelable);

		TextView dialogMainTitleTextView = (TextView) dialog
				.findViewById(R.id.dialogMainTitleTextView);
		dialogMainTitleTextView.setText(titleText);

		TextView dialogMainBodyTextView = (TextView) dialog
				.findViewById(R.id.dialogMainBodyTextView);
		dialogMainBodyTextView.setText(bodyText);

		return dialog;
	}
	public Dialog createCustomDialogExit(int layout, Context context, boolean isCancelable) {

		Dialog dialog = new Dialog(context);
		dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
		dialog.setContentView(layout);
		dialog.setCancelable(isCancelable);
		
		Button btn1 = (Button) dialog
				.findViewById(R.id.buttonMoreApp);

		Button btn2 = (Button) dialog
				.findViewById(R.id.buttonExit);

		return dialog;
	}

}
